<%@page import="com.kh.pajx.sop.util.common.FormatDate"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String temp_str = FormatDate.getUseDate(new Date());
	String sid=request.getParameter("sid");
%>
<!DOCTYPE html>
<html>
<head>
<title>业务数据统计报表--对外结算</title>
<!----------------------- CSS ----------------------->
<link href="${pageContext.request.contextPath}/dwz/themes/default/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="${pageContext.request.contextPath}/dwz/themes/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="${pageContext.request.contextPath}/dwz/themes/css/print.css" rel="stylesheet" type="text/css" media="print"/>
<link href="${pageContext.request.contextPath}/dwz/uploadify/css/uploadify.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if IE]>
<link href="${pageContext.request.contextPath}/dwz/themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->
<!--[if lte IE 9]>
<script src="${pageContext.request.contextPath}/dwz/js/speedup.js" type="text/javascript"></script>
<![endif]-->

<!----------------------- JS ----------------------->

<!-- JQuery -->
<script src="${pageContext.request.contextPath}/dwz/script/js/jquery-1.7.2.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript" src="<%=path%>/js/jquery.PrintArea.js"></script>
<script type="text/javascript">
function init(){
	var sid='<%=sid%>';
	var k=sid.split(",");
	var rs="";
	for(i=0;i<k.length;i++){
	   rs+=String.fromCharCode(k[i]);
	} 
	var rss=rs.split(";");
	$("#code").text(rss[0]);
	$("#feesum").text(rss[1]);
	$("#appDate").text(rss[2]);
	var trs="";
		 var datalist=$("#foreign");
			var url="foreign_findAreaMangerPrint.action";
			var data={
					"areaManger.appBillCode":rss[0]
			}
			datalist.empty();
			$.post(url,data,function(message){
				var list=message;
				var str=list.split(";");
				for ( var i = 0; i < str.length-1; i++) {
					trs+="<tr>";
					var str1=str[i].split(",");
					for ( var j = 0; j< str1.length; j++) {
						if(j!=str1.length-2)
						trs+="<td style='text-align:center'>"+str1[j]+"</td>";
					}
					trs+="</tr>";
				}
				datalist.html(trs);
			  })
}
	 function print(){
			$("#doctitle").printArea();
   }
</script>
<style type="text/css">
.tds{
	text-align: center;
}
.th{
text-align:center;
}
</style>
</head>
<body onload="init()">
	<div>
		<div id="doctitle" align="center">
		    
			<table class="list" >
			<thead>
			<tr>
			<td colspan="17">
				<h3 align="center">对外结算费用申请</h3>
				</td>
					</tr>
							<tr  height="30px;">
							<td colspan="17" >
							<table >
							<tr>
							<td style="width:300px;">
			 					单据号：<font id="code"></font></td>
								<td style="width:300px;">申请人：${sessionScope.ywuser.userName}</td>
								<td style="width:300px;">申请日期：<font id="appDate"></font></td>
								<td style="width:300px;">
								审批金额：<font id="feesum"></font>
								
								</td>
								</table>
								</td>
							</tr>
							 <tr >
                       <th rowspan="2" style="text-align:center">地区名称</th>
                       <th rowspan="2" style="text-align:center">结算日期</th>
                       <th rowspan="2" style="text-align:center">学校数量</th>
						<th rowspan="2" style="text-align:center">总人数</th>
						<th colspan="4" style="text-align:center">有效用户数</th>
						<th colspan="2" style="text-align:center">行业经理结算</th>
                       </tr>
                       <tr>
                       	<th style="text-align:center">本期</th>
                       	<th style="text-align:center">上期</th>
                       	<th style="text-align:center">新增</th>
                       	<th style="text-align:center">开通率</th>
                       	<th style="text-align:center">批复金额</th>
                       	</tr>
							</thead>
				      <tbody id="foreign">
				       </tbody>
			</table>
		<div style="margin-right:20px;float: right;margin-top: 30px; ">
		        <input  type="submit" value="打印" class="btn btn-info" id="btnPrint" onclick="print()"/>
		</div>
	</div>

</body>
</html>
